home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / guidexv / gdd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  3.0 KB  |  77 lines

  1. /*
  2.  * @(#)gdd.h    2.19 91/10/15 Copyright 1991 Sun Microsystems.
  3.  *
  4.  * This file is a product of Sun Microsystems, Inc. and is provided for
  5.  * unrestricted use provided that this legend is included on all tape
  6.  * media and as a part of the software program in whole or part.  Users
  7.  * may copy or modify this file without charge, but are not authorized to
  8.  * license or distribute it to anyone else except as part of a product
  9.  * or program developed by the user.
  10.  * 
  11.  * THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  12.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  13.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  14.  * 
  15.  * This file is provided with no support and without any obligation on the
  16.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  17.  * modification or enhancement.
  18.  * 
  19.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  20.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE
  21.  * OR ANY PART THEREOF.
  22.  * 
  23.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  24.  * or profits or other special, indirect and consequential damages, even
  25.  * if Sun has been advised of the possibility of such damages.
  26.  * 
  27.  * Sun Microsystems, Inc.
  28.  * 2550 Garcia Avenue
  29.  * Mountain View, California  94043
  30.  */
  31.  
  32. /*
  33.  * Drag-n-drop interface.
  34.  */
  35.  
  36. #ifndef guide_gdd_DEFINED
  37. #define guide_gdd_DEFINED
  38.  
  39. #include    <c_varieties.h>
  40.  
  41. /*
  42.  * Data structure used by the drag and drop package to exchange
  43.  * information with the application.
  44.  */
  45. typedef struct Drop_info {
  46.     char    *app_name;        /* Application's name. Set/Get     */
  47.     char    *data_label;        /* Label of chunk of data. Set/Get */
  48.     char    *source_host;        /* Hostname of source. Get         */
  49.     char    *filename;        /* Filename. Set/Get               */
  50.     int     length;        /* Length of data in bytes. Set/Get*/
  51.     char     *data;            /* Pointer to chunk of data.Set/Get*/
  52.     char    *tmpfile;        /* Tempfile name. Get              */
  53.     } GDD_DROP_INFO;
  54.  
  55. /*
  56.  * Public Defines
  57.  */
  58. #define GDD_DRAG_STARTED    1
  59. #define GDD_DRAG_COMPLETED     2
  60. /*
  61.  * Public functions.
  62.  */
  63. EXTERN_FUNCTION( void    gdd_init_dragdrop, (Xv_Window) );
  64. EXTERN_FUNCTION( void    gdd_register_drop_site, (Xv_opaque, void (*)(Xv_opaque, Event *, GDD_DROP_INFO *)) );
  65. EXTERN_FUNCTION( void    gdd_register_drop_target, (Xv_opaque, void (*)(Xv_opaque, Event *, GDD_DROP_INFO *), void (*)(Xv_opaque, Event *, GDD_DROP_INFO *, int)) );
  66. EXTERN_FUNCTION( void    gdd_unregister_drop_site, (Xv_opaque) );
  67. EXTERN_FUNCTION( void    gdd_activate_drop_site, (Xv_opaque, Rect *) );
  68. EXTERN_FUNCTION( Notify_value    gdd_load_event_proc, (Xv_window, Event *, Notify_arg, Notify_event_type) );
  69. EXTERN_FUNCTION( int    gdd_drop_target_notify_proc, (Panel_item, unsigned int, Event *) );
  70. EXTERN_FUNCTION( void    gdd_print_drop_info, (GDD_DROP_INFO *) );
  71. EXTERN_FUNCTION( int    gdd_get_drag_name, (Xv_Window, char *) );
  72. EXTERN_FUNCTION( int    gdd_set_drag_name, (Xv_window, Xv_window, int, int, char *) );
  73. EXTERN_FUNCTION( int    gdd_drag_file, (Xv_window, Server_image, char *) );
  74.  
  75. #endif ~guide_gdd_DEFINED
  76.  
  77.